#include <Kharlia/Engine/Common.h>
#include <Kharlia/Engine/Init.h>
#include <Kharlia/Engine/Resource.h>
#include <Kharlia/Core/ObjectUtil.h>

KH_ENABLE_HELD_SHARED_PTR_FROM_PYTHON(kharlia::engine::FResourceManager)
KH_ENABLE_HELD_SHARED_PTR_FROM_PYTHON(kharlia::engine::FResource)
KH_ENABLE_HELD_SHARED_PTR_FROM_PYTHON(kharlia::engine::FTexture)

namespace kharlia { namespace engine {

void _InitResourceBindings() {
    class_<FResourceManager, shared_ptr<FResourceManager>, noncopyable>
        ("FResourceManager", init<>())
        .def("GetResource", &FResourceManager::GetResource)
        ;

    class_<FResource, shared_ptr<FResource>, noncopyable>
        ("FResource", no_init)
        .add_property("Name", &FResource::GetName)
        .add_property("Group", &FResource::GetGroup)
        ;

    class_<FTexture, shared_ptr<FTexture>, bases<FResource>, noncopyable>
        ("FTexture", no_init)
        .def_readonly("Client", &FTexture::mClient)
        .add_property("IsValid", &FTexture::GetIsValid)
        .add_property("Width", &FTexture::GetWidth)
        .add_property("Height", &FTexture::GetHeight)
        ;
}

}}